{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/header.html"}
{literal}
<script type="text/javascript">
    $(function(){
        $('.assortment').hover(function(){
            $('.assort_list').stop().fadeIn();
        },function(){
            $('.assort_list').stop().fadeOut();
        });
    });
</script>
<script type="text/javascript" src="/js/user.js"></script>

<script type="text/javascript">
    $(function(){
        $('.overlay-close,.popup_btn1').click(function(){
            $('.mui-dialog-mask').hide();
            $('.mui-dialog').hide();
        });

        $('.pro_li_ft .blue').click(function(){
            $('.mui-dialog-mask').show();
            $('.mui-dialog').show();
        });
    });
</script>

<script type="text/javascript">
    $(function(){
        $('.j_ut li').click(function(){
            oThis = $(this).index();
            $(this).addClass('curr').siblings().removeClass('curr');
            $('.receiving_address>ul>li').eq(oThis).show().siblings().hide();
        });
    });
</script>

<style>
    .assort_list{display: none;}
</style>
{/literal}

<div class="help_center">

<div class="crumbs_tmg" style="padding-top:0;">当前位置：<a href="#">首页</a><i class="ffs">></i><a href="#">会员中心</a><i class="ffs">></i><span class="blue">求购订单</span></div>

    {include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/menu_title.html"}
    <div class="user_content">
    	<h3 class="user_title j_ut">
        	<ul>
            	<li class="curr cp">求购订单</li>
            </ul>
        </h3>

        <div class="receiving_address">
            
            <ul>
                <li>
                	 <div class="resource_search">
                         <form name="" action="" method="get">品种：<input type="text" name="cate_name" class="rs_ph" value="{$cate_name}"/>牌号：<input type="text" name="product_name" class="rs_ph" value="{$product_name}"/> 厂商：<input type="text" name="brand_name" class="rs_ph" value="{$brand_name}"/>交货地：<input type="text" name="delivery_area" class="rs_ph" value="{$delivery_area}"/> <input class="rs_ph_btn" type="submit" value="搜  索"/></form>
                     </div>
            
                        <ul class="rs_bar">
                            <li {if $status eq ''} class="curr" {/if}><a href="/user/buyorder">全部状态</a> <i>({$totalItemsall})</i></li>
                            <li {if $status eq '1'} class="curr" {/if}><a href="/user/buyorder?status=1">待审核</a><i>({$totalItemsaudit})</i></li>
                            <li {if $status eq '2'} class="curr" {/if}><a href="/user/buyorder?status=2">交易中</a><i>({$totalItemsdeal})</i></li>
                            <li {if $status eq '3'} class="curr" {/if}><a href="/user/buyorder?status=3">交易完成</a><i>({$totalItemsdone})</i></li>
                            <li {if $status eq '4'} class="curr" {/if}><a href="/user/buyorder?status=4">订单取消</a><i>({$totalItemscancel})</i></li>
                        </ul>
                        
                        <ul class="rs_tmn">
                            <li>订单信息</li>
                            <li>单价（元/吨）</li>
                            <li>数量（吨）</li>
                            <li>配送方式</li>
                            <li>状态</li>
                            <li>操作</li>
                        </ul>
                        
                        <div class="pro_list_items">
                            <ul>
                                {if !$data}
                                <li class="tac" style="padding-top: 10px;">亲，您还没有求购订单哦，赶紧去购物哦!</li>
                                {else}
                                {foreach from=$data key=key item=item}
                                <li>
                                    <div class="pro_li_title">
                                        <span class="pr20">订单号 : {$item.order_key}</span>
                                        <span class="pr20">供应商：{if $item.business_name neq ''}{$item.business_name} {else}{$item.sale_business_name} {/if}<img src="/images/login_qq.png" width="16" height="16" onclick="javascript:window.open('http://wpa.qq.com/msgrd?v=3&uin={$item.qq}&site=qq&menu=yes');" class="vam ml5 cp" /></span>
                                        <span class="fr pr20">{$item.order_date}</span>
                                    </div>
                                    <div class="pro_li_list">
                                        <p>{{$item.cate_name}}-{$item.product_name}/{$item.brand_name}</p>
                                        <p class="orange">{$item.currency_mark}{$item.price}</p>
                                        <p>{$item.num}</p>
                                        <p class="orange">{if $item.delivery_method eq '2'}配送{else}自提{/if}</p>
                                        <p>{$_PurchaseOrderMean[$item.status]}</p>
                                        <p>
                                            {if $item.status eq '1'}
                                            <a href="/user/setOrderStatus?order_id={$item.order_id}&status=4" class="blue">取消订单</a>
                                            <a href="/user/orderdetail?order_id={$item.order_id}" class="blue">查看详情</a>
                                            {else if $item.status eq '2'}
                                            <a href="/user/setOrderStatus?order_id={$item.order_id}&status=3" class="blue">订单完成</a>
                                            <a href="/user/orderdetail?order_id={$item.order_id}" class="blue">查看详情</a>
                                            {else}
                                            <a href="/user/orderdetail?order_id={$item.order_id}" class="blue">查看详情</a>
                                            {/if}
                                        </p>
                                    </div>
                                    <div class="pro_li_ft">
                                        <span class="fwb">合计：<i class="orange mr10">{$item.amount}</i></span>
                                    </div>

                                </li>
                                {/foreach}
                                {/if}

                            </ul>
                        </div>
                        <div class="page tar ptb10p" id="page">{$links}</div>
                </li>
                <li  style="display:none;">
                	 <div class="resource_search">品种：<input type="text" class="rs_ph" value=""/>牌号：<input type="text" class="rs_ph" value=""/>厂商：<input type="text" class="rs_ph" value=""/>交货地：<input type="text" class="rs_ph" value=""/><input class="rs_ph_btn" type="button" value="搜  索"/></div>

            <ul class="rs_bar">
            	<li class="curr">全部状态 <i>(3)</i></li>
                <li>待确认<i>(1)</i></li>
                <li>交易中<i>(1)</i></li>
                <li>完成<i>(1)</i></li>
                <li>取消<i>(1)</i></li>
            </ul>

            <ul class="rs_tmn">
            	<li>订单信息</li>
                <li>单价（元/吨）</li>
                <li>数量（吨）</li>
                <li>配送方式</li>
                <li>状态</li>
                <li>操作</li>
            </ul>

            <div class="pro_list_items">
            	<ul>
                	<li>
                    	<div class="pro_li_title">
                        	<span class="pr20">供应商：上海塑米城信息科技有限公司<img src="/images/login_qq.png" width="16" height="16" class="vam ml5" /></span>
                        	<span class="fr pr20">2015-11-20</span>
                        </div>
                        <div class="pro_li_list">
                        	<p>LDOE-7100F/茂名</p>
                            <p class="orange">1500.00</p>
                            <p>150.00</p>
                            <p class="orange">自提</p>
                            <p>待确认</p>
                            <p><a href="#" class="blue">下单</a><a href="#" class="gray ml10">取消</a></p>
                        </div>
                        <div class="pro_li_ft">
                        	<span class="fwb">合计：<i class="orange mr10">8600.0</i></span>
                        </div>

                    </li>

                </ul>
            </div>
                </li>
            </ul>
           
            
        </div>
        
    </div>
</div>

{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/footer.html"}